package com.example.abstractFactory;

import com.example.abstractFactory.father.FruitsBehavior;
import com.example.abstractFactory.father.PhoneBehavior;
import com.example.abstractFactory.father.extend.Apple;
import com.example.abstractFactory.father.extend.Banana;
import com.example.abstractFactory.father.extend.Oppo;
import com.example.abstractFactory.father.extend.Vivo;

public class FruitsFactoryExtend extends AbstractFactory {
    @Override
    public FruitsBehavior getFruitsBehavior(String fruitType) {
        if (fruitType.equalsIgnoreCase("apple")) {
            return new Apple();
        }
        else if (fruitType.equalsIgnoreCase("banana")) {
            return new Banana();
        }
        return null;
    }

    @Override
    public PhoneBehavior getPhoneBehavior(String phoneType) {
        return null;
    }
}
